using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;

namespace ShoeBuddy
{
    public class Product : Panel
    {
        Bitmap image;
        public Bitmap Image
        {
            get { return image; }
            set { this.image = value; }
        }

        string imageFilename;
        public string ImageFilename
        {
            get { return imageFilename; }
            set { this.imageFilename = value; }
        }
        string title;
        public string Title
        {
            get { return title; }
            set { this.title = value; }
        }

        string description;
        public string Description
        {
            get { return description; }
            set { this.description = value; }
        }

        float price;
        public float Price
        {
            get { return price; }
            set { this.price = value; }
        }

        List<Image> multiViewImages = new List<Image>();
        public List<Image> MultiViewImages
        {
            get{ return multiViewImages; }
        }

        public Product(string productCode)
        {
            Image = (Bitmap)Bitmap.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShoeBuddy.Images." + productCode + "-t.jpg"));
            ImageFilename = productCode + "-t.jpg";

            Image image = (Bitmap)Bitmap.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShoeBuddy.Images." + productCode + "-p.jpg"));
            multiViewImages.Add(image);

            for (int i = 1; i <= 7; i++)
            {
                image = (Bitmap)Bitmap.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShoeBuddy.Images." + productCode + "-" + i.ToString() + ".jpg"));
                multiViewImages.Add(image);
            }
        }

    }
}
